@extends('layouts.admin_common') @section('content')


    <div class="breadcrumbs_container">{{
	Breadcrumbs::render('admin.stock_list') }}</div>
    <div class="system_tab_line"></div>

    <div class="lyx_search_table">
        <form>
            <div class="row">
                <div class="form-group row col-sm-4">
                    <label for="inputPassword"
                           class="col-sm-4 col-form-label">@lang('symessages.info.stock_name')</label>
                    <div class="col-sm-8">
                        <select class="form-control" name="storehouse_id">
                            <option value="">@lang('symessages.info.all_msg')</option>
                            @foreach ($storehouse as $sh)
                                <option
                                    value="{{$sh->storehouse_id}}" <?php is_selected($sh->storehouse_id, $param, 'storehouse_id') ?> >{{$sh->storehouse_name}}</option>
                            @endforeach
                        </select>
                    </div>
                </div>

                <div class="form-group row col-sm-4">
                    <label for="inputPassword" class="col-sm-4 col-form-label">@lang('symessages.info.category')</label>
                    <div class="col-sm-8">
                        <select class="form-control" name="category_id">
                            <option value="">@lang('symessages.info.all_msg')</option>
                            @foreach ($category as $cat)
                                <option
                                    value="{{$cat->category_id}}" <?php is_selected($cat->category_id, $param, 'category_id') ?> >{{$cat->category_name}}</option>
                            @endforeach
                        </select>
                    </div>
                </div>

                <div class="form-group row col-sm-4">
                    <label for="inputPassword"
                           class="col-sm-4 col-form-label">@lang('symessages.info.product_name')</label>
                    <div class="col-sm-8">
                        <select class="form-control" name="goods_id">
                            <option value="">@lang('symessages.info.all_msg')</option>
                            @foreach ($goods as $good)
                                <option
                                    value="{{$good->goods_id}}" <?php is_selected($good->goods_id, $param, 'goods_id') ?> >{{$good->goods_name}}</option>
                            @endforeach
                        </select>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="form-check form-check-inline">
                    <label for="inputPassword" class="col-sm-10 col-form-label">不良のみ表示</label>
                    <div class="col-sm-4">
                        <input class="form-check-input" <?php is_selected(2, $param, 'bad_num',3) ?> type="checkbox" value="2" name="bad_num">
                    </div>
                </div>

                <div class="form-check form-check-inline">
                    <label for="inputPassword" class="col-sm-10 col-form-label">販売停止商品のみ表示</label>
                    <div class="col-sm-4">
                        <input class="form-check-input" <?php is_selected(2, $param, 'state',3) ?> type="checkbox" value="2" name="state">
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6"></div>
                <div class="col-sm-3">
                    <button class="btn btn-primary button_normal">csv出力</button>
                </div>
                <div class="col-sm-3">
                    <button class="btn btn-primary button_normal">帳票出力</button>
                </div>
            </div>

        </form>


        <div class="lyx_table">
            <div class="row lyx_table_title">
                <div class="col-sm-1"></div>
                <div class="col-sm-7">androJapan 在庫一覧</div>
                <div class="col-sm-4">出力日:<?php echo toDate(time(),'Y-m-d')?></div>
            </div>
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th scope="col">@lang('symessages.info.stock_name')</th>
                    <th scope="col">@lang('symessages.info.category')</th>
                    {{--<th scope="col">グループ</th>--}}
                    <th scope="col">@lang('symessages.info.product_code')</th>
                    <th scope="col">@lang('symessages.info.product_name')</th>
                    <th scope="col">@lang('symessages.info.color')</th>
                    <th scope="col">@lang('symessages.info.size')</th>
                    <th scope="col">@lang('symessages.info.web_num')</th>
                    <th scope="col">@lang('symessages.info.store_num')</th>
                    <th scope="col">@lang('symessages.info.bad_num')</th>
                    <th scope="col">@lang('symessages.info.stop_sale')</th>
                </tr>
                </thead>
                <tbody>
                @foreach ($list as $k=>$val)
                    <tr>
                        <th>{{$val->storehouse_name}}</th>
                        <td>{{$val->category_name}}</td>
                        {{--<td>和の極み -煉-</td>--}}
                        <td>{{$val->goods_code}}</td>
                        <td>{{$val->goods_name}}</td>
                        <td>{{$val->color}}</td>
                        <td>{{$val->size}}</td>
                        <td>{{$val->web_num}}</td>
                        <td>{{$val->num}}</td>
                        <td>{{$val->bad_num}}</td>
                        <td>{{$val->stop_sales}}</td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>

    </div>


@endsection

